Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-nullish-coalescing-operator

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-nullish-coalescing-operator

Remove nullish coalescing operator


Version published
Weekly downloads
17M
increased by6.08%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-transform-nullish-coalescing-operator?

The @babel/plugin-transform-nullish-coalescing-operator package allows Babel to transform nullish coalescing operator (??) syntax into equivalent JavaScript code that can run in environments that do not support this operator. The nullish coalescing operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.

What are @babel/plugin-transform-nullish-coalescing-operator's main functionalities?

Transform nullish coalescing operator

This feature transforms the nullish coalescing operator (??) into equivalent JavaScript code. In this example, if 'foo' is null or undefined, 'bar' will be set to 'default value'. Otherwise, 'bar' will be set to the value of 'foo'.

const foo = null;\nconst bar = foo ?? 'default value';

Other packages similar to @babel/plugin-transform-nullish-coalescing-operator

Keywords

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc